<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMpWeixinMenu extends Migration
{
    /**
     * Run the migrations.
     *微信菜单
     * @return void
     */
    public function up()
    {
        Schema::create('weixin_mune', function (Blueprint $table) {
            $table->engine = 'MyISAM';
            $table->comment='微信菜单';
            $table->increments('id')->comment('自增键');
            $table->string('parentname',20)->default('')->comment('父类名称');
            $table->mediumInteger('parentid')->unsigned()->default(0)->comment('父类id');
            $table->string('childrenname',20)->default('')->comment('子类名称');
            $table->mediumInteger('childrenid')->unsigned()->default(0)->comment('子类id');
            $table->string('type',10)->default('')->comment('类型,view,click');
            $table->string('typevalue',255)->default('')->comment('事件值');
            $table->mediumInteger('category')->unsigned()->default(0)->comment('0,表示 个人菜单，1表示企业菜单');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('weixin_mune');
    }
}
